<?php
/**
 * This class contain the most popular element object in this system. 
 * 
 * You only extends you form to MA_Forms and in the init method call to parent
 *
 */
class MA_Form extends Zend_Form 
{
	protected $_username;
	protected $_mail;
	protected $_password;
	protected $_firstName;
	protected $_lastName;
	protected $_submit;
	
	public function init()
	{
		$this->_username = new Zend_Form_Element_Text( 'username' );
        $this->_username->setLabel( 'Username' )
            ->setRequired( true )
            ->addFilter('StringToLower')
            ->addValidator( 'NotEmpty', true);
        
        $this->_mail = new Zend_Form_Element_Text( 'mail' );
        $this->_mail->setLabel( 'E-mail' )
            ->setRequired( true )
            ->addFilter('StringToLower')
            ->addValidator( 'NotEmpty', true);

        $this->_password = new Zend_Form_Element_Password('password');
        $this->_password->setLabel('Clave')
            ->setRequired(true)
            ->addValidator('NotEmpty', true);

        $this->_firstName = new Zend_Form_Element_Text( 'first_name' );
        $this->_firstName->setLabel( 'First Name' )
            ->setRequired( true )
            ->addValidator( 'NotEmpty', true);

        $this->_lastName = new Zend_Form_Element_Text( 'last_name' );
        $this->_lastName->setLabel( 'Last Name' )
            ->setRequired( true )
            ->addValidator( 'NotEmpty', true);
            
            
        $this->_submit = new Zend_Form_Element_Submit('submit');
        $this->_submit->setLabel('Entrar');
            
	}
}
